package companion

class Test {
    companion object Factory : Runnable {
        fun create(): Test = Test()

        override fun run() {

        }
    }
}

private interface AbsFactory

class Test2 {
    companion object Factory : AbsFactory
}

fun main(args: Array<String>) {
    //
    val f = Test.Factory
    val obj1 = f.create()
    val obj2 = Test.create()
    val f2 = Test2.Factory
    f2.hashCode()
}